import React from 'react';
import Login from '@/pages/Login';
import Home from '@/pages/Layout';
import Error from '@/pages/Error';
import {
  BrowserRouter as Router,
  Route,
  Switch,
  Redirect,
} from 'react-router-dom';
export default function App() {
  return (
    <Router>
      <div>
        <Switch>
          <Route path="/login">
            <Login></Login>
          </Route>
          <Route path="/home">
            <Home></Home>
          </Route>
          <Redirect from="/" to="/home" exact></Redirect>
          <Route>
            <Error></Error>
          </Route>
        </Switch>
      </div>
    </Router>
  );
}
